package com.example.test_2_1_transaction.service;

import com.example.test_2_1_transaction.mapper.UserInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserService {
    @Autowired
    private UserInfoMapper userInfoMapper ;
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public Integer insertUser(String userName, String password){
        return userInfoMapper.insert(userName,password);
    }
}
